<!DOCTYPE html>
<html>
<head>
    <meta charset="utf-8">
	<title></title>
</head>
<body>
    <div id="con">abcdeasad</div>
</body>
<script type="text/javascript">
	var con = document.getElementById('con');
	var string = con.innerText;
	var result = string.substring(0,3);
	alert(result);
</script>
</html>